home *** CD-ROM | disk | FTP | other *** search
/ Light ROM 1 / LIGHT-ROM 1 (Amiga Library Services)(1994).iso / ffdisks / d884.lha / P-Compress / P-Compress.doc < prev    next >
Text File  |  1993-07-16  |  16KB  |  324 lines

  1. PRE1
  2.  
  3.                            P - C O M P R E S S V2.9 
  4.     INTRODUCTION 
  5.  
  6.      P-Compress is a compression/de-compression tool designed to meet the great
  7.   majority of the requirements of users efficiently and economically while
  8.   being very easy to use.  It will compress single files, drawers or complete
  9.   disks, preserving disk and drawer structures.  Individual files can be joined
  10.   into a single PACK, similar to an archive and by using PACKs two uncompressed
  11.   disks will normally fit on one.  Drawers and disks can be copied from one
  12.   place to another, selected files or classes of files being compressed and the
  13.   remainder just copied.  P-Compressed files, including sounds, pictures and 
  14.   animations, can be displayed by P-Reader without prior decompression, and P-
  15.   Compressed texts can be loaded into and saved from P-Writer.  The latest
  16.   version of P-Reader is being used to display this file.
  17.  
  18.     Two important areas not covered at present are:
  19.       Hard-disk back-up. Use a specialised programme (eg BRU).
  20.       Self-extracting executables.  Use Imploder from Fish 422.
  21.  
  22.     One of the main uses of P-Compress may be to reduce the size of your own
  23.   personal library collection of utilities, data, games, code examples, stored
  24.   away for occasional reference.  By just compressing all data, leaving icons
  25.   and executables untouched, and using P-Reader as the basic text reader and
  26.   display tool, my own "library" of 35 disks reduced to 25.  Caution is needed
  27.   when doing this as data files used by the executables must be left unchanged.
  28.   Alternatively if the P-Suite utility P-Fixlib is to be used (which allows DOS
  29.   to treat compressed files as though they were uncompressed) the whole disk
  30.   can be compressed, doubling its capacity. 
  31.  
  32.      P-Compress employs the latest LZH compression technique using code by
  33.   Barthel and Krekel, modified to limit memory requirements. 
  34.  
  35.      This release also includes the small utility P-Unpack, whose sole purpose
  36.   in life is to unpack Packs.  Details from line 229 on.
  37.  
  38.    COMPARISON WITH ALTERNATIVE PROGRAMMES 
  39.  
  40.     Whole disk compression tools:  eg LHWARP, Zoom.
  41.  
  42.      When used to PACK a complete disk P-Compress only compresses the files on
  43.   the disk and not such additional data as boot-blocks.  As a result output
  44.   will be smaller than that of true whole-disk tools. P-Unpack can write a
  45.   standard boot-block to the re-constituted disk.  Speed is comparable but
  46.   memory usage much lower.   If you really need to include everything on the
  47.   disk, Zoom is recommended.
  48.  
  49.     Archivers:  eg  LHArc, PKAZip.
  50.  
  51.     To suit their role in the maintenance of archives these include a host of
  52.   facilities which are of little or no use to most of us.  As a result they are
  53.   not easy to use. One effect of the complexity is that with some combinations
  54.   of commands and switches files can be lost. (Tip: always use the extended
  55.   filenames switch).  The P-Compress PACK option can be regarded as a very 
  56.   simple archiver and is faster and uses less memory than LHArcA  and much
  57.   faster than LHArc.  PKAZip is very fast, efficiency usually poorer, memory
  58.   useage greatly excessive.  The new Shrink sets a new standard in efficiency,
  59.   and although it uses a lot of memory and is a bit slow it competes with LHA
  60.   for the title of the best current archiver.  Large archived collections of 
  61.   files cannot be handled by single-drive Amigas without expansion memory
  62.   (unless a vast number of disk-swops are acceptable), PACKS can.
  63.  
  64.      General compression tools: eg Power Packer
  65.  
  66.     An excellent programme in its day the current PD version of PowerPacker is
  67.   completely outclassed by the new wave of LZH compression tools - although
  68.   decompression is fast.  As far as ease of use is concerned users should form
  69.   their own judgement.  PowerPacker has the ability to create self- extracting
  70.   executables which P-Compress does not do at present, however Imploder handles
  71.   this particular job better and more quickly.
  72.  
  73.    This version checks any file presented for compression or decompression to
  74.   see if it has been compressed with PowerPacker.  If so it is automatically
  75.   decompressed.  Self-executing executables are excluded.
  76.  
  77.    Some comparative performance figures are given at the end of this doc.
  78.  
  79.    INSTRUCTIONS 
  80.    
  81.    P-Compress opens a window on Workbench showing:
  82.  
  83.     On the left   Progress window.
  84.     Top right     Decompress window.
  85.     Centre right  Compress window.
  86.     Bottom right  Execute window.
  87.  
  88.    Color selection gadget can be found at the top of the lower right P-Compress
  89.   logo.  Click it to cycle the available color palettes.
  90.  
  91.    If you have the Arp library installed the programme will use the Arp File-
  92.   Requester, otherwise a simple string gadget requester will appear.  If you 
  93.   are using the latter to call a drawer the entry must end with a slash /.
  94.  
  95.   P-Compress can be started from the cli or by double-clicking its icon.
  96.  
  97.     DECOMPRESSION 
  98.  
  99.   Click From.  File requester will come
  100.   up over the progress window. 
  101.   Enter or select the drawer, or
  102.   file to be de-compressed.  Click OK
  103.   (or cancel).  Selected reference
  104.   will be shown in the From box.
  105.    #! 1 42 6 0 decompress.brush
  106.     Click To.   File requester will re-appear.  Enter/select a disk, file
  107.   or drawer as required. If an existing file other than a PACK is selected
  108.   but a drawer or disk was entered at From, a warning will appear.  Otherwise
  109.   new files will be opened as necessary. A PACK can only be decompressed to a 
  110.   disk or drawer -  a file entered at To will be ignored and the programme 
  111.   will look at its path to decide where to place the unpacked output.
  112.   Compressed files will be decompressed to the indicated location, uncompressed
  113.   files will be just copied.  Name and size of the file being handled appears 
  114.   in the progress window.  On completion a summary will appear at the bottom of
  115.   the Decompress window (except where only a single file has been called).
  116.    
  117.     The programme will recognise whether the input is a normal file or a PACK,
  118.   and will act accordingly. PACK in the execute window need not be switched on.
  119.  
  120.     You can decompress back over the original - with the same reference entered
  121.   at From and To.  Sufficient space must be available on the disk to take the
  122.   file currently being decompressed as well as the original (later deleted).
  123.   
  124.     If you run out of disk space before decompression is complete you will be
  125.   asked to insert a new disk.  On completion delete any empty drawers on the
  126.   disks and transfer icons where necessary.  Note that when checking for space
  127.   no account is taken of whether an existing file is being overwritten.  This
  128.   can mean that the request is made when not strictly needed.  Collect the 
  129.   extra file or files on another disk and copy back.
  130.   
  131.     Before decompressing compressed files a checksum (CRC) is read and checked
  132.   - if an error is found an appropriate warning will be given and the
  133.   offending file passed over.
  134.  
  135.     Before an existing file is overwritten you will be asked to OK it.
  136.   Clicking OVERWRITE in the execute window suspends this feature, which is
  137.   also  suspended when a PACKed file is being decompressed.  Click GO in the 
  138.   execute window to start decompression, CANCEL to cancel the process, and QUIT
  139.   to close down.
  140.     #! 1 42 3 0 compress.brush 
  141.    COMPRESSION 
  142.  
  143.    Select From and To in turn as before
  144.   and enter or select the source and
  145.   destination references.  Either a disk,
  146.   drawer or individual file may be
  147.   selected. If a disk or drawer is to be
  148.   compressed click on one or more of
  149.   the boxes listed below to indicate the
  150.   types of file to be compressed, the
  151.   remainder will just be copied.  Copied files are not provided with Checksums.
  152.  
  153.      DATA  "Project" type data files such as texts, IFF pics, animations etc.
  154.      ICONS You may want to leave icons uncompressed.
  155.      EXEC  Libraries and all executables.
  156.      HEXEC Executables are stripped of any debug or symbol hunks. In normal
  157.                        operation these are not needed.
  158.  
  159.     If you need to select specific individual files to be compressed or just
  160.   copied use ASK - the programme will halt at each file and ask for
  161.   instructions.
  162.  
  163.     If HEXEC is selected the stripped file will be put into a temporary file
  164.   RAM:S.  If EXEC is also selected RAM:S will then be compressed to the final
  165.   destination, otherwise it will be just copied; the sizes of the original
  166.   file, RAM:S, and the final output will be shown.
  167.  
  168.     Normally when compressing a file or drawer each file is transferred to an
  169.   equivalent place at the output location, new drawers being opened as needed,
  170.   so that the original structure of drawers and their contents is preserved.
  171.   Alternately a PACK can be created in which all the files are joined into one
  172.   compendium file or PACK.  An individual checksum is provided for each of the
  173.   files contained.  The name PACK will be appended to any filename that may be
  174.   inserted at To.  On decompression the original structure is re-created.  
  175.   HEXEC is not functional when compressing to a pack.  Note that the PACK that
  176.   is to be created must be in a different drawer from that being packed (or a
  177.   different disk if a whole disk is being packed), otherwise P-Compress will 
  178.   try to include the PACK within itself - and fail.
  179.  
  180.    If you run out of disk space before compression is complete you will be
  181.   asked to insert a new disk (except where a PACK is being made - a file
  182.   cannot be split between two disks).  (But see the comment in the decompress
  183.   section.)
  184.  
  185.     Click OVERWRITEPACK as necessary, and then GO to start compression.
  186.  
  187.     Progress and final summary will be shown as before.
  188.  
  189.     EXECUTION 
  190.  
  191.    Click OVERWRITE if existing files are to be overwritten.
  192.    CLICK PACK if you wish to put all the individual files into a single PACK.
  193.    Click GO to start compression or decompression, CANCEL to cancel the
  194.   process and QUIT to close down.
  195.     #! 1 42 5 0 exec.brush
  196.     Note that you may enter the same reference in From and To, allowing the
  197.   direct replacement of a file by its compressed (or decompressed) image. An
  198.   intermediate temporary file in RAM is used, which of course means that memory
  199.   consumption is increased.  The original is not overwritten unless the
  200.   compression or decompression operation returns correctly, however for safety
  201.   's sake it is always better to have a backup.
  202.     
  203.  
  204.    COMPARISONS 
  205.  
  206.      Three files have been used:
  207.        File 1 is a HAM picture.  Length 92872 bytes.  
  208.        File 2 is an executable file.  Length 28792 bytes. 
  209.        File 3 was made up by joining a general mixture of texts, executables
  210.          and icons into a single large file.  Length 608440 bytes.
  211.       
  212.                                Size            Compress        Decompress  
  213.   File 1
  214.     LHArcA                    51812            1min.08secs     33secs   
  215.     PowerPacker (fastest)     64412            2min.37secs     17secs
  216.     PowerPacker (best)        54196            23mins.45secs   16secs
  217.     PKAZip                    53407            45secs          21secs
  218.     P-Compress                52136            49secs          21secs
  219.  
  220.   File 2
  221.     LHArcA                    15788            26secs          11secs
  222.     PowerPacker (good)        17122            2min.11         9secs
  223.     PKAZip                    15919            24secs          7secs
  224.     P-Compress                15816            17secs          8secs
  225.  
  226.   File 3
  227.     LHArcA and PKAZip failed - out of memory.
  228.     PowerPacker not tried - out of patience.
  229.     P-Compress                287372           6m.28           1m.48
  230.  
  231.   In all cases compression/decompression was from disk to RAM: using an Amiga
  232.   500 with 1M of memory.  
  233.  
  234.                          P - U N P A C K V1.2           
  235.  
  236.     When sending out a disk containing a PACK you will normally include on the
  237.   disk the means of decoding it.  This can of course be P-Compress itself, but
  238.   the considerably smaller P-Unpack may be used instead.  The end result is
  239.   the same but P-Unpack provides two further advantages:
  240.  
  241.      It provides the efficient disk-swopping facilities needed by single-disk
  242.     -drive Amigas with memory that is not sufficient for the whole pack to be
  243.     copied to and decompressed from ram.
  244.  
  245.      By writing the icon with the ToolType "boot" the decompressed output disk 
  246.     is made bootable.  (Not functional for the single-floppy-drive user).
  247.  
  248.     P-Unpack is called as the Default Tool of a Project icon for a PACK file.  
  249.   When the icon is clicked the PACK will be decompressed and the original
  250.   structure of files and drawers copied to a disk. 
  251.  
  252.   Preparation - Sender
  253.  
  254.     The Pack should be created in the normal way with P-Compress.  Prepare
  255.   a PROJECT Icon for the Pack, and write P-Unpack as the Default Tool. Include
  256.   a path (e.g :c/P-Unpack) if necessary.  If the output disk is to be made
  257.   bootable write the single word boot into the Tool Types space.  Include
  258.   P-Unpack on the disk along with the Pack or Packs.  It is a good idea to
  259.   name the pack "CLICK-ME" or incorporate "click-me" into the icon so that the
  260.   recipient knows what to do. The recipient should not need any other 
  261.   instructions.
  262.      
  263.   Use - Recipient 
  264.  
  265.    The recipient will boot the received disk normally and faced with an icon
  266.   that incorporates the instruction Click-me will double-click it.  P-Unpack
  267.   will check the number of floppy drives connected.
  268.  
  269.     If there is more than one floppy drive connected a requester will appear
  270.   asking the user to select one, insert an empty disk, and click go.  Once
  271.   decompression is under way an Abort gadget is added.  Clicking on this will
  272.   stop the programme on completion of the current file.  If the pack includes
  273.   a disk icon, this will be adopted and seen if the disk is removed and
  274.   re-inserted.  If the Tool Type boot was written into the icon the output disk
  275.   will be bootable.  If the expanded PACK is larger than a single disk, a
  276.   notice will call for a new disk when the first is full.
  277.  
  278.     Where P-Unpack finds only one floppy drive a different requester will
  279.   appear asking the user to insert the source disk and click go.  Decompression
  280.   to RAM will continue for as long as memory is available and the user will
  281.   then be asked to insert the output disk - ram will be copied to this.  Disk
  282.   swopping will continue until decompression is complete - four or five swops
  283.   may be needed.  No early warning will be given of a full disk, but a new
  284.   disk can be inserted at any of the disk-swops. The output disk can not be
  285.   made bootable, otherwise the  final result is the same.
  286.  
  287.  
  288.            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  289.  
  290.     A large Byte of thanks to Steve Bolton of South Australia whose comments
  291.   and suggestions have greatly improved this programme.
  292.  
  293.     P-Compress and P-Unpack are Freeware.  They may be copied and distributed
  294.   freely and used without charge for non_commercial purposes.  Authority for
  295.   commercial use should be obtained from the author below.
  296.  
  297.     No responsibility can be accepted for any loss occasioned by use of these
  298.   programmes.
  299.  
  300.     Comments, suggestions, bug-reports all welcome.
  301.    Chas A. Wyndham,
  302.    1265 Canning Mills Road,
  303.    Roleystone,
  304.    WA 6111.
  305.    Australia 
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.